package cc.ilzy.mall.product.controller;

import cc.ilzy.mall.api.controller.IBannerController;
import cc.ilzy.mall.model.pojo.Banner;
import cc.ilzy.mall.product.service.IBannerService;
import cc.ilzy.mall.utils.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ilzy
 * @since 2025-07-09
 */
@RestController
public class BannerController implements IBannerController {
    @Autowired
    private IBannerService bannerService;

    @Override
    public ApiResponse<List<Banner>> list() {
        List<Banner> list = bannerService.list();
        return ApiResponse.success(list);
    }
}
